fix: read-only mode - #2740
Merged
Merged
Conversation
Contributor
Greptile SummaryThis PR centralizes CodeMirror read-only behavior so read-only documents remain selectable and navigable without focusing an editable input or opening the soft keyboard.
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issue identified. The coordinated read-only state, DOM editability, focus suppression, transaction filtering, selection handling, and quick-tools routing preserve non-editing interactions while blocking user-originated document mutations. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
FileState[File editable/loading state] --> Reconfigure[Reconfigure read-only compartment]
Reconfigure --> StateFacet[EditorState.readOnly]
Reconfigure --> DomFacet[EditorView.editable]
Reconfigure --> Guards[Input, transaction, and focus guards]
StateFacet --> Commands[Commands and quick tools]
DomFacet --> Touch[Touch selection and context menu]
Guards --> Unfocused[Keep read-only editor unfocused]
Commands -->|Read-only-safe action| Selection[Selection/navigation update]
Commands -->|Editing action| Blocked[Document change blocked]
Touch --> Selection
Reviews (1): Last reviewed commit: "fix: read-only mode" | Re-trigger Greptile |
deadlyjack
requested review from
RohitKushvaha01 and
bajrangCoder
and removed request for
bajrangCoder
August 14, 2026 09:57
This comment has been minimized.
This comment has been minimized.
|
Preview Release for this, has been built. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.